import wmcRequest from '..'
import { IModuleConfigdef } from '@/render/store/configdef/types'

export function updateModuleConfigDef(moduleConfigDef: IModuleConfigdef): any {
  return wmcRequest.patch({
    url: '/configDef',
    data: moduleConfigDef
  })
}

export function getModuleConfigDef(
  projectName: string,
  projectModuleName: string
): any {
  return wmcRequest.get({
    url: `/configDef?projectName=${projectName}&projectModuleName=${projectModuleName}`
  })
}
